package com.example.yimai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@TableName("easybuy_order")
@Document(indexName = "order")
public class Order {
    @TableId(type = IdType.AUTO)
    @Id
    private Integer id;
    @Field(type = FieldType.Integer)
    private Integer userId;
    @Field(type = FieldType.Text)
    private String loginName;
    @Field(type = FieldType.Text)
    private String userAddress;
    @Field(type = FieldType.Date)
    private Date createTime;
    @Field(type = FieldType.Float)
    private Float cost;
    //订单号
    @Field(type = FieldType.Text)
    private String serialNumber;

    //订单状态 0待付款 1已完成 2取消
    private int status;

}